home *** CD-ROM | disk | FTP | other *** search
/ Amiga Aktuell / Amiga Aktuell.iso / amiga-aktuell / net tools / fido net / tagmaker / tagmaker.rexx next >
OS/2 REXX Batch file  |  1996-09-05  |  1KB  |  50 lines

  1. /* TagMaker V1.0 13th June 1995 By Anthony Brice */
  2. /* Usage: Tagmaker.rexx <InputFile> <OutputFile> */
  3.  
  4. /* Used to convert a text file into a list of taglines in spot format */
  5.  
  6. /* Comments: anthony@backyard.demon.co.uk */
  7.  
  8. Options Results
  9.  
  10. Ver='1.0'
  11. Intro= 'Tagline file created by TagMaker 1.0 by Anthony Brice'
  12. Insert = '%%'
  13. Say ; Say 'TagMaker 'Ver' By Anthony Brice.' ; Say
  14. Parse Arg InFile OutFile
  15.  
  16. If Infile  = '' then Signal Usage
  17. If OutFile = '' then Signal Usage
  18.  
  19. If ~Exists(InFile) then Do
  20.   Say 'Error - Input file not found!' ; Say
  21.   Exit 10
  22. End
  23.  
  24. Call Open(Plop,OutFile,"W")
  25. Call WriteLN(Plop,Intro)
  26. Call WriteLN(Plop,Insert)
  27.  
  28. Say 'TagFile initialised .. Working....' ; Say 
  29.  
  30. Call Open(Plap,InFile,"R")
  31.  
  32. Do Until EOF(Plap)
  33.   Temp=ReadLN(Plap)
  34.   If Temp~='' then Do
  35.     WriteLN(Plop,Temp)
  36.     WriteLN(Plop,Insert)
  37.   End
  38. End
  39.  
  40. Call Close(Plap)
  41. Call Close(Plop)
  42.  
  43. Say 'All Done. 'InFile' has the taglines converted!' ; Say
  44. Exit 0
  45.  
  46. Usage:
  47. Say 'Usage: rx TagMaker.rexx <File to convert> <Output file>' ; Say
  48. Exit 0
  49.  
  50.